package com.outstanding.his.medicine.service.impl;

import java.util.Collection;

import org.springframework.beans.factory.annotation.Autowired;

import com.outstanding.his.medicine.dao.IMedicineDao;
import com.outstanding.his.medicine.domain.Medicine;
import com.outstanding.his.medicine.service.IMedicineService;

public class MedicineService implements IMedicineService {

	@Autowired
	public IMedicineDao medicineDao;

	public void setMedicineDao(IMedicineDao medicineDao) {
		this.medicineDao = medicineDao;
	}

	@Override
	public Medicine submitMedicine(Medicine medicine) {
		medicine = this.medicineDao.submitMedicine(medicine);
		return medicine;
	}

	@Override
	public Medicine getMedicine(Integer medicineId) {
		return this.medicineDao.getMedicine(medicineId);
	}

	@Override
	public Collection<Medicine> getMedicineList() {
		return this.medicineDao.getMedicineList();
	}

	@Override
	public Medicine updateMedicine(Medicine medicine) {
		medicine = this.medicineDao.updateMedicine(medicine);
		return medicine;
	}

	@Override
	public Collection<Medicine> getWesternMedicineList() {
		return this.medicineDao.getWesternMedicineList();
	}

	@Override
	public Collection<Medicine> getChineseMedicineList() {
		return this.medicineDao.getChineseMedicineList();
	}

	@Override
	public Collection<Medicine> getInsulinMedicineList() {
		return this.medicineDao.getInsulinMedicineList();
	}

}
